package design_pattern.state.demo02;

import design_pattern.state.demo02.state.OutOfWorkState;

/**
 * @version 1.0.0
 * Created by cyd on 2022-06-05 16:58:58
 * @ClassName : design_pattern.state.demo02.Example03
 * @Description : 类描述
 */
public class Main {
    public static void main(String[] args) {
        WorkContext workContext = new WorkContext(new OutOfWorkState());
        workContext.setHour(10);
        workContext.writeProgram(workContext);

        workContext.setHour(11);
        workContext.writeProgram(workContext);

        workContext.setHour(12);
        workContext.writeProgram(workContext);

        workContext.setHour(13);
        workContext.writeProgram(workContext);

        workContext.setHour(15);
        workContext.writeProgram(workContext);

        workContext.setHour(19);
        workContext.writeProgram(workContext);

        workContext.setHour(23);
        workContext.writeProgram(workContext);

        workContext.setHour(6);
        workContext.writeProgram(workContext);

    }
}
